import { showSuccess, showWarning, showError, showInfo, showPrimary } from '@/utils/message'

export default {
  install(app) {
    // 全局属性
    app.config.globalProperties.$message = {
      success: showSuccess,
      warning: showWarning,
      error: showError,
      info: showInfo,
      primary: showPrimary
    }
    
    // 全局注入
    app.provide('message', {
      success: showSuccess,
      warning: showWarning,
      error: showError,
      info: showInfo,
      primary: showPrimary
    })
  }
} 